package com.mathlearning.auth.dto;

import lombok.Data;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
public class UserInfo {
    private Long id;
    private String phone;
    private String nickname;
    private String avatar;
    private Integer gender;
    private LocalDate birthday;
    private String bio;
    private String school;
    private String grade;
    private String role;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;

    public UserInfo(com.mathlearning.auth.entity.User user) {
        this.id = user.getId();
        this.phone = user.getPhone();
        this.nickname = user.getNickname();
        this.avatar = user.getAvatar();
        this.gender = user.getGender();
        this.birthday = user.getBirthday();
        this.bio = user.getBio();
        this.school = user.getSchool();
        this.grade = user.getGrade();
        this.role = user.getRole();
        this.createTime = user.getCreatedAt();
        this.updateTime = user.getUpdatedAt();
    }
}





